﻿@model Lead2012.ViewModels.DashboardViewModel
@{
    ViewBag.Title = "In lịch sự kiện";
    Layout = null;
}

<!DOCTYPE html>
<html class="fixed-width print">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title - Quản lý quan hệ khách hàng | Gia Linh Software Solution., Ltd.</title>
    <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />

    <link rel="stylesheet" type="text/css" href="/Content/jqueryui.css" media="all" />
    <link rel="stylesheet" type="text/css" href="/Content/jquerytimepicker.css" />
    <link rel="stylesheet" type="text/css" href="/Content/all.css" />
    <link rel="stylesheet" type="text/css" href="/Content/gridview.css" />
    <!--[if IE 8]><link rel="stylesheet" type="text/css" href="/Content/ie8.css" media="all" /><![endif]-->

    <script type="text/javascript" src="/Scripts/lib/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery.jsonp.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery.validate.min.js"></script>
    <script type="text/javascript" src="/Scripts/lib/knockout-latest.js"></script>
    <script type="text/javascript" src="/Scripts/lib/knockout.validation.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery-ui-1.8.23.custom.min.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery.validate.custom.js"></script>
    <script type="text/javascript" src="/Scripts/lib/fancybox.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery.editable-select.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery.cookie.js"></script>
    <script type="text/javascript" src="/Scripts/lib/swfobject.js"></script>
    <script type="text/javascript" src="/Scripts/lib/jquery.uploadify.js"></script>
    <script type="text/javascript" src="/Scripts/superfish.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.main.js"></script>
    <script type="text/javascript" src="/Scripts/global.js"></script>
    <script type="text/javascript" src="/Scripts/common.js"></script>
</head>

<body class="leads-view edit-lead-print">
    @if (Model != null)
    {
        <div id="wrapper">
		    <div class="w1">

			    <div id="main">
				    <section class="container">
					    <form action="#" class="form">
						    <fieldset>
						
						 	    <div class="content">
								
								    <h3 class="centered-wbtn no-border">
  								        <span class="name">
                                            <span class="top-head-small">Lịch các sự kiện cho ngày</span>
                                            <span id="dateShow" class="name" style="font-weight: bold">
                                                @Request.QueryString["startDate"].ToString()
                                            </span> 
                                        </span>
                                      <div id="print-leads-btns">
                                        <a class="btn btn-print-small" href="javascript:void(0);" onclick="javascript:window.print();">Print</a>
                                        <a class="btn btn-close-small" href="javascript:void(0);" onclick="javascript:window.close();">Close</a>
                                      </div>
								    </h3>
                
                                    <ul class="calendar-list">
                                        <li class="title">
                                        <span class="time">Thời gian</span>
                                        <span class="lead">Tên khách hàng</span>
                                        <span class="activity no-border">Tiêu đề</span>
                                        </li>
                                        @foreach (var CalendarItem in Model.CalendarList)
                                        {
                                            if (CalendarItem.Events != null && CalendarItem.Events.Count > 0)
                                            {
                                                bool showTimeZone = true;
                                                foreach (var EventItem in CalendarItem.Events)
                                                {
                                                    <li>
                                                        <span class="time">
                                                            @if (showTimeZone)
                                                            {
                                                                @CalendarItem.TimeZone
                                                            }
                                                        </span>
                                                        <span class="time2">@EventItem.TimeEvent</span>
                                                        <div class="borderWrapper">
                                                            <span class="activity autoHeight"><a href="@EventItem.LeadUrl" target="_blank">@EventItem.LeadName</a></span>
                                                            <span class="subject wrapword">@EventItem.Title</span>
                                                        </div>
                                                    </li>
                                                    showTimeZone = false;
                                                }
                                            }
                                            else
                                            {
                                                <li>
                                                    <span class="time">@CalendarItem.TimeZone</span>
                                                    <span class="time2"></span>
                                                    <div class="borderWrapper">
                                                        <span class="activity autoHeight"></span>
                                                        <span class="subject wrapword"></span>
                                                    </div>
                                                </li>
                                            }
                                        }
                                    </ul>
							    </div><!-- //.content -->
              
						    </fieldset>
					    </form>
				    </section>
			    </div>
			
		    </div>
	    </div>
    }
</body>
</html>